<template>
  <div>
    <h1>测试页面</h1>
    <ul>
      <li>{{ store.user }}</li>
      <li @click = "changeUser">
        <van-button type="primary">修改user</van-button>
      </li>
      <li></li>
      <li></li>
      <li></li>
    </ul>
  </div>
</template>

<script setup lang='ts'>
// import { useUserStore } from '@/stores/modules/user';
import { useUserStore } from '@/stores';

const store = useUserStore()

// 点击修改用户store全局数据
const changeUser = () => {
  store.setUser({
    token:'123',
    id:'1',
    account:'',
    mobile:'13800000000',
    avatar:''
  })
}
</script>

<style lang='scss' scoped>

</style>